home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gcc / ixemul_src.lha / ixemul-41.0 / Makefile.in < prev    next >
Makefile  |  1995-06-07  |  8KB  |  215 lines

  1. #### Start of system configuration section. ####
  2.  
  3. srcdir =    @srcdir@
  4. VPATH =        @srcdir@
  5.  
  6. # Common prefix for machine-independent installed files.
  7. prefix =    @prefix@
  8.  
  9. # Common prefix for machine-dependent installed files.
  10. exec_prefix =    @exec_prefix@
  11.  
  12. bindir =    $(exec_prefix)/bin
  13. libdir =    $(exec_prefix)/lib
  14. syslibdir =    $(exec_prefix)/Sys/libs
  15. incdir =    $(exec_prefix)/include
  16.  
  17. INSTALL =    @INSTALL@
  18. INSTALL_DATA =    @INSTALL_DATA@
  19.  
  20. # Force the use of gcc 2.6.3 for now.  The beta version of 2.7 currentl
  21. # produces an ixemul.library that has problems when doing a full
  22. # configure of the GNU tree.
  23. #CC =        @CC@
  24. CC = gcc-2.6.3
  25.  
  26. CFLAGS =    @CFLAGS@
  27. LDFLAGS =    @LDFLAGS@
  28.  
  29. RANLIB =    @RANLIB@
  30.  
  31. #### End system configuration section ####
  32.  
  33. # Default is generic m68k version with no FPU support.
  34.  
  35. CPU =        68000
  36. FPU =        soft-float
  37. BASE =        no-baserel
  38.  
  39. # Some additional options for OTHER_CFLAGS that may or may not be useful are:
  40. #
  41. # -funroll-loops
  42. # -fforce-mem
  43. # -DDEBUG_VERSION    (build a debugging version)
  44.  
  45. #Use the flag to suppress stack extension when 2.6.4/2.7 is installed.
  46. #STACKEXTEND =    -mnostackextend
  47. OTHER_CFLAGS =    -fomit-frame-pointer $(STACKEXTEND)
  48.  
  49. BASE_FLAGS_TO_PASS = \
  50.         "BASE=$(BASE)" \
  51.         "BUILDDIR=$(BUILDDIR)" \
  52.         "CC=$(CC)" \
  53.         "CFLAGS=$(CFLAGS)" \
  54.         "CPU=$(CPU)" \
  55.         "FPU=$(FPU)" \
  56.         "LDFLAGS=$(LDFLAGS)" \
  57.         "OTHER_CFLAGS=$(OTHER_CFLAGS)" \
  58.         "RANLIB=$(RANLIB)"
  59.  
  60. FLAGS_TO_PASS =    $(BASE_FLAGS_TO_PASS) $(EXTRA_FLAGS_TO_PASS)
  61.  
  62. ###  The default thing to do is to make all reasonable combinations of the
  63. ###  library.
  64. ###
  65. ###  Note that libsrc, which builds the runtime startup files and both
  66. ###  versions of libc.a, completely ignores the FPU/CPU/BASE variables,
  67. ###  so we just call it directly.  Also note that the 68000 versions
  68. ###  of the files MUST be built before libsrc.
  69. ###
  70. ###  Other than the restriction noted above, you can comment out specific
  71. ###  CPU/FPU combinations that you are not interested in.  However you
  72. ###  do have to build both the baserel and no-baserel versions for the
  73. ###  combinations you want to build.
  74.  
  75. all:
  76.         $(MAKE) build CPU=68000 FPU=soft-float BASE=no-baserel
  77.         $(MAKE) build CPU=68000 FPU=soft-float BASE=baserel
  78.         $(MAKE) build CPU=68020 FPU=68881      BASE=no-baserel
  79.         $(MAKE) build CPU=68020 FPU=68881      BASE=baserel
  80.         $(MAKE) build CPU=68020 FPU=soft-float BASE=no-baserel
  81.         $(MAKE) build CPU=68020 FPU=soft-float BASE=baserel
  82.         $(MAKE) build CPU=68030 FPU=68881      BASE=no-baserel
  83.         $(MAKE) build CPU=68030 FPU=68881      BASE=baserel
  84.         $(MAKE) build CPU=68030 FPU=soft-float BASE=no-baserel
  85.         $(MAKE) build CPU=68030 FPU=soft-float BASE=baserel
  86.         $(MAKE) build CPU=68040 FPU=68881      BASE=no-baserel
  87.         $(MAKE) build CPU=68040 FPU=68881      BASE=baserel
  88.         @(cd libsrc && $(MAKE) $(FLAGS_TO_PASS))
  89.  
  90. ###  The "build" target makes a single flavor of the library.  I.E.
  91. ###  the 68040+FPU version.
  92.  
  93. build:
  94.         @$(MAKE) gen_library-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  95.         @$(MAKE) glue-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  96.         @$(MAKE) gnulib-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  97.         @$(MAKE) gnulib-$(FPU)-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  98.         @$(MAKE) network-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  99.         @$(MAKE) stack-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  100.         @$(MAKE) static-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  101.         @$(MAKE) stdio_2-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  102.         @$(MAKE) stdlib-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  103.         @$(MAKE) string-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  104.         @$(MAKE) library-$(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS)
  105.  
  106. ###  These targets are used to map a generic target <builddir>-<BASE>-<CPU>-<FPU>
  107. ###  to one of the less complicated targets.  I.E. if something only needs to
  108. ###  be built for a particular CPU and FPU, and the value of BASE is irrelevant,
  109. ###  then it would be mapped to <CPU>-<FPU>.
  110.  
  111. gen_library-$(BASE)-$(CPU)-$(FPU):
  112.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=gen_library
  113.  
  114. glue-$(BASE)-$(CPU)-$(FPU):
  115.         @$(MAKE) $(BASE) $(FLAGS_TO_PASS) BUILDDIR=glue
  116.  
  117. gnulib-$(BASE)-$(CPU)-$(FPU):
  118.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=gnulib
  119.  
  120. gnulib-$(FPU)-$(BASE)-$(CPU)-$(FPU):
  121.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=gnulib-$(FPU)
  122.  
  123. library-$(BASE)-$(CPU)-$(FPU):
  124.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=library
  125.  
  126. network-$(BASE)-$(CPU)-$(FPU):
  127.         @$(MAKE) $(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=network
  128.  
  129. stack-$(BASE)-$(CPU)-$(FPU):
  130.         @$(MAKE) $(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=stack
  131.  
  132. static-$(BASE)-$(CPU)-$(FPU):
  133.         @$(MAKE) $(BASE)-$(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=static
  134.  
  135. stdio_2-$(BASE)-$(CPU)-$(FPU):
  136.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=stdio_2
  137.  
  138. stdlib-$(BASE)-$(CPU)-$(FPU):
  139.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=stdlib
  140.  
  141. string-$(BASE)-$(CPU)-$(FPU):
  142.         @$(MAKE) $(CPU)-$(FPU) $(FLAGS_TO_PASS) BUILDDIR=string
  143.  
  144. ###  These targets are the ones that are reduced from the full generic
  145. ###  targets, on a per directory basis.  I.E. if it is only necessary
  146. ###  to build versions for a specific BASE and the CPU/FPU combination
  147. ###  is irrelevant, then the generic target is mapped to just BASE.
  148.  
  149. # This target is for things that are only dependent on BASE.
  150.  
  151. $(BASE):
  152.         @if [ -d $(BUILDDIR)/$(BASE) ]; then \
  153.             true; \
  154.         else \
  155.             echo mkdir -p $(BUILDDIR)/$(BASE); \
  156.             mkdir -p $(BUILDDIR)/$(BASE); \
  157.         fi;
  158.         @(cd $(BUILDDIR)/$(BASE) ; $(MAKE) -f ../Makefile $(FLAGS_TO_PASS));
  159.  
  160. # This target is for things that are only dependent on CPU and FPU.
  161.  
  162. $(CPU)-$(FPU):
  163.         @if [ -d $(BUILDDIR)/$(CPU)/$(FPU) ]; then \
  164.             true; \
  165.         else \
  166.             echo mkdir -p $(BUILDDIR)/$(CPU)/$(FPU); \
  167.             mkdir -p $(BUILDDIR)/$(CPU)/$(FPU); \
  168.         fi;
  169.         @(cd $(BUILDDIR)/$(CPU)/$(FPU) ; $(MAKE) -f ../../Makefile $(FLAGS_TO_PASS))
  170.  
  171. # This target is for things that are dependent on CPU, FPU, and BASE.
  172.  
  173. $(BASE)-$(CPU)-$(FPU):
  174.         @if [ -d $(BUILDDIR)/$(BASE)/$(CPU)/$(FPU) ]; then \
  175.             true; \
  176.         else \
  177.             echo mkdir -p $(BUILDDIR)/$(BASE)/$(CPU)/$(FPU); \
  178.             mkdir -p $(BUILDDIR)/$(BASE)/$(CPU)/$(FPU); \
  179.         fi;
  180.         @(cd $(BUILDDIR)/$(BASE)/$(CPU)/$(FPU) ; $(MAKE) -f ../../../Makefile $(FLAGS_TO_PASS));
  181.  
  182. ###  Install all the libraries, include files, runtime files, etc.
  183.  
  184. install:
  185.         $(INSTALL) library/68000/soft-float/ixconfig $(bindir)/ixconfig
  186.         $(INSTALL) library/68000/soft-float/ixemul.library $(syslibdir)/ixemul.library
  187.         $(INSTALL) library/68000/soft-float/ixemul.trace $(syslibdir)/ixemul.trace
  188.         $(INSTALL) library/68020/soft-float/ixemul.library $(syslibdir)/ixemul020.library
  189.         $(INSTALL) library/68020/soft-float/ixemul.trace $(syslibdir)/ixemul020.trace
  190.         $(INSTALL) library/68030/soft-float/ixemul.library $(syslibdir)/ixemul030.library
  191.         $(INSTALL) library/68030/soft-float/ixemul.trace $(syslibdir)/ixemul030.trace
  192.         $(INSTALL) library/68020/68881/ixemul.library $(syslibdir)/ixemul020fpu.library
  193.         $(INSTALL) library/68020/68881/ixemul.trace $(syslibdir)/ixemul020fpu.trace
  194.         $(INSTALL) library/68030/68881/ixemul.library $(syslibdir)/ixemul030fpu.library
  195.         $(INSTALL) library/68030/68881/ixemul.trace $(syslibdir)/ixemul030fpu.trace
  196.         $(INSTALL) library/68040/68881/ixemul.library $(syslibdir)/ixemul040fpu.library
  197.         $(INSTALL) library/68040/68881/ixemul.trace $(syslibdir)/ixemul040fpu.trace
  198.         $(INSTALL) libsrc/bcrt0.o $(libdir)/bcrt0.o
  199.         $(INSTALL) libsrc/crt0.o $(libdir)/crt0.o
  200.         $(INSTALL) libsrc/rcrt0.o $(libdir)/rcrt0.o
  201.         $(INSTALL) libsrc/libc.a $(libdir)/libc.a
  202.         $(INSTALL) libsrc/libbc.a $(libdir)/libb/libc.a
  203.         (cd $(srcdir)/include && cp -r . $(incdir))
  204.         
  205. clean:
  206.         (cd gen_library ; $(MAKE) $(FLAGS_TO_PASS) clean)
  207.         (cd gnulib ; $(MAKE) $(FLAGS_TO_PASS) clean)
  208.         (cd gnulib-soft-float ; $(MAKE) $(FLAGS_TO_PASS) clean)
  209.         (cd gnulib-68881 ; $(MAKE) $(FLAGS_TO_PASS) clean)
  210.         (cd library ; $(MAKE) $(FLAGS_TO_PASS) clean)
  211.         (cd stdio_2 ; $(MAKE) $(FLAGS_TO_PASS) clean)
  212.         (cd stdlib ; $(MAKE) $(FLAGS_TO_PASS) clean)
  213.         (cd string ; $(MAKE) $(FLAGS_TO_PASS) clean)
  214.         (cd network ; $(MAKE) $(FLAGS_TO_PASS) clean)
  215.